using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RugbyClubWpf.Models
{
    /// <summary>
    /// Represents a player in the rugby club.
    /// </summary>
    public class Player
    {
        /// <summary>
        /// Gets or sets the unique identifier for the player.
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int PlayerId { get; set; }

        /// <summary>
        /// Gets or sets the name of the player.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the position (skills) of the player.
        /// </summary>
        public string Position { get; set; }

        /// <summary>
        /// Gets or sets the age of the player.
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// Gets or sets the user ID associated with the player.
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// Gets or sets the user associated with the player.
        /// </summary>
        [ForeignKey("UserId")]
        public User User { get; set; }

        /// <summary>
        /// Gets or sets the coach ID associated with the player.
        /// </summary>
        public int CoachId { get; set; }

        /// <summary>
        /// Gets or sets the coach associated with the player.
        /// </summary>
        [ForeignKey("CoachId")]
        public Coach Coach { get; set; }
    }
}
